package com.zxz.vo;

public class JsonResult<T> {
    private String code = "0";
    private String message = "ok";
    private T response;

    public static <T> JsonResult<T> success(T response) {
        JsonResult<T> jsonResult = new JsonResult<>();
        jsonResult.setResponse(response);
        return jsonResult;
    }

    public T getResponse() {
        return response;
    }

    public void setResponse(T response) {
        this.response = response;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
